import React from 'react'
import './ShowView.scss'
import TextShow from'./TextShow'
import Comments from './Comments'

import LineText from '../../components/LineText/LineText'

class ShowView extends React.Component{
    constructor(propos){
        super(propos);
        this.state={
            // 路由传参
            ifurl:this.props.location.state.ifurl,
            texturl:this.props.location.state.texturl
        };
        // console.log(0,this.props.location.state.ifurl);
        console.log('路由传参',this.state.texturl);
    }

    render(){
        return(
            <div>
                <iframe src={this.state.ifurl?this.state.ifurl:"http://localhost:3000/static/text.html"} width='100%' height="500" title="1"></iframe>
                <TextShow />
                <Comments />
                <LineText texturl={this.state.texturl}/>
            </div>
        )
    }

}
export default ShowView